<?php

	/**
	 * addOn type: multiUpload
	 * 10/01/2011 - class creation
	 *
	 * @author bsuter
	 * @package devmod
	 * 
	 * method type args:
	 * @param param_value [string] the namespace for the PRIMARY KEY in the current table where you setup the addOn.
	 * @param image_table [array]
	 * 	-> name [string] the name of the IMAGE TABLE
	 *  -> param_image_id [string] the field which should contain the image id from Avance Image Upload class
	 *  -> param_cat_id [string] the field which should contain the reference to the current runing table (on which the devmod currently is loaded)
	 */
	class Devmod_method_addOn_multiUpload extends Devmod_addOn_abstraction {
		
		public function type_edit()
		{
			$sql = $this->db->select($this->config['sql_table'], "*", "WHERE " . $this->config['edit']['where'], false);
			
			$this->args['param_value'] = $this->helper->eval_vars($this->args['param_value'], $sql);
		
			$this->view->assign(array(
				'param_value' => $this->args['param_value'],
				'session_name' => session_name(),
				'session_id' => session_id()
			));
			
			$this->view->append_over('tpl_addons', array(
				$this->cfg['identifier'] => $this->view->fetch('common/addon_multiUpload.tpl')
			));
		}
		
	}